import QtQuick 2.6
import QtQuick.Window 2.2
import QtMultimedia 5.9

Window {
    visible: true
    width: 1024
    height: 768
    title: qsTr("Hello World")

    MainForm {
        anchors.fill: parent
        mouseArea.onClicked: {
            console.log(qsTr('Clicked on background. Text: "' + textEdit.text + '"'))
        }
        Camera {
            id: camera
            imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash
            exposure {
                exposureCompensation: -1.0
                exposureMode: Camera.ExposurePortrait
            }
            flash.mode: Camera.FlashRedEyeReduction
        }

        VideoOutput {
            id:videoOutput
            source: camera
            width: 648
            height: 450
            x: 20
            y: 20
            anchors.horizontalCenter: fillRec.horizontalCenter
            focus: visible // to receive focus and capture key events when visible
            fillMode: VideoOutput.PreserveAspectCrop
        }
    }
    flags: Qt.Window | Qt.FramelessWindowHint | Qt.WindowMinimizeButtonHint

}
